import { Injectable, NestMiddleware } from '@nestjs/common';

@Injectable()
export class SessionInitMiddleware implements NestMiddleware {
  use(req: any, res: any, next: () => void) {
    
    if(!req.session.emails){
      req.session.emails={}
    }
    
    next();
    
  }
}
